package com.lungle.warmdiary.app.model.response;

import com.lungle.warmdiary.app.AppException;
import com.lungle.warmdiary.app.model.Entity;
import com.lungle.warmdiary.app.model.ListEntity;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by God on 2016/8/9.
 */
public class MediaChannelList extends Entity implements ListEntity {


    private List<MediaChannel> channelList = new ArrayList<>();

    public static MediaChannelList parse(InputStream inputStream) throws IOException,
            AppException {
        MediaChannelList list = new MediaChannelList();

        MediaAccountList v_mediaAccountList = MediaAccountList.parse(null);

        MediaChannel v_mediaChannel = new MediaChannel();
        v_mediaChannel.setAccounList(v_mediaAccountList);
        v_mediaChannel.setChannelName("微信");

        List<MediaChannel> mlist = new ArrayList<>();
        mlist.add(v_mediaChannel);


        list.setChannelList(mlist);

        return list;

    }

    public List<MediaChannel> getChannelList() {
        return channelList;
    }

    public void setChannelList(List<MediaChannel> channelList) {
        this.channelList = channelList;
    }

    @Override
    public List<?> getList() {
        return channelList;
    }
}
